<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function Star(uname, age) {
        this.uname = uname
        this.age = age
        this.sing = function () {
          console.log('我会唱歌')
        }
      }

      const zjl = new Star('周杰伦', 40)
      const ljj = new Star('林俊杰', 42)

      //   console.log(zjl)
      //   console.log(ljj)

      //   zjl.sing()
      //   ljj.sing()

      console.log(zjl.sing === ljj.sing)
    </script>
  </body>
</html>
